import React, { useEffect, useContext, createContext } from 'react';
import classnames from 'classnames';
import './index.module.scss';
import { RightOutline } from 'antd-mobile-icons'
interface userProps {
	avatar: string|null;
	username: string,
	token?:string,
	onSetting?:()=>void,
	style?: React.CSSProperties;
}
export default function UserHeader(props: userProps) {
	const { avatar, username,onSetting,style } = props;
	return (<>
		<div styleName='user-avatar' >
			<img src="/src/pages/user/components/avatar/avatar.svg" alt="" onClick={onSetting} />
			<span styleName='user-name' style={style}>{username}</span>
		</div>
		<div styleName='switch-account' style={style}>
			<span></span>
			<RightOutline fontSize={13} />
		</div></>
	);
}
